﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BOSS.Framework.Search.ValueProvider
{
    /// <summary>
    /// 缺省值提供器
    /// </summary>
    public interface IDefaultValueProvider
    {
        /// <summary>
        /// 获取指定字段的整数默认值
        /// </summary>
        /// <param name="contentType"></param>
        /// <param name="fieldName"></param>
        /// <returns></returns>
        int? GetDefaultValueAsInt32(string contentType, string fieldName);

        /// <summary>
        /// 获取指定字段的整数默认值
        /// </summary>
        /// <param name="contentType"></param>
        /// <param name="fieldName"></param>
        /// <returns></returns>
        decimal? GetDefaultValueAsDecimal(string contentType, string fieldName);

        /// <summary>
        /// 获取指定字段的字符串默认值
        /// </summary>
        /// <param name="contentType"></param>
        /// <param name="fieldName"></param>
        /// <returns></returns>
        string GetDefaultValueAsString(string contentType, string fieldName);

        /// <summary>
        /// 判断指定字段的取值是否为默认值
        /// </summary>
        /// <param name="contentType"></param>
        /// <param name="fieldName"></param>
        /// <param name="value"></param>
        /// <returns></returns>
        bool IsDefaultValue(string contentType, string fieldName, string value);

        /// <summary>
        /// 判断指定字段的取值是否为默认值
        /// </summary>
        /// <param name="contentType"></param>
        /// <param name="fieldName"></param>
        /// <param name="value"></param>
        /// <returns></returns>
        bool IsDefaultValue(string contentType, string fieldName, decimal value);

        /// <summary>
        /// 判断指定字段的取值是否为默认值
        /// </summary>
        /// <param name="contentType"></param>
        /// <param name="fieldName"></param>
        /// <param name="value"></param>
        /// <returns></returns>
        bool IsDefaultValue(string contentType, string fieldName, int value);
    }
}
